def count_lines(name) -> int:
    with open(name, 'r') as f:
        print(f"count of lines in file {name}: {len(f.readlines())}")


def count_chars(name) -> int:
    with open(name, 'r') as f:
        result = f.read().replace('\n', '')
        print(f"count of lines in file {name}: {len(result)}")


def test(name):
    count_lines(name)
    count_chars(name)


if __name__ == "__main__":
    test("test_file.txt")
